package com.caimiao.miao.library.usb.interfaces;

import com.caimiao.miao.library.usb.logic.UsbCode;
import com.caimiao.miao.library.usb.accessory.Command;

public interface ICmdUtil {

    Command getCommand(int command, int value, int value2);

    Command getCommand(@UsbCode.Code int status, char[] value);

    char getCode(char[] command);

    char[] getCommand(char[] value);

    byte[] getBytes(char[] value);

    void returnCommand(char[] command);

    /**
     * 从value中得到一条完整的命令(可能有多条，后期再优化)
     */
    Command checkReadData(char[] value);

    /**
     * 判断是否为一条完整的命令
     */
    boolean check(char[] read, int start, int end);

    boolean isTicketOut(char[] command);
}
